/**
 * \file lib/system/syscall.h
 * \author Davide Gessa
 * \date 10-16-09
 */
#ifndef SYSCALL_H
#define SYSCALL_H


#define SYSCALL_NUMBER 			255

// System
#define SYS_INFO				01 //

// Hardware
#define IO_INB					10 //
#define IO_OUTB					11 //
#define IO_INW					12 //
#define IO_OUTW					13 //

#define HW_HANDLER_REG			20 //
#define HW_HANDLER_UNREG		21 //
#define HW_DEBUGOUT				22 //
#define HW_SHUTDOWN				23 //


// Task
#define MSG_SEND				40 //
#define MSG_RECV				41 //
#define TASK_GET_PID			42 //
#define TASK_GET_TERM			43 //


// Services
#define SRV_START				60 //
#define SRV_CREATE				61 //
#define SRV_DESTROY				62 //
#define SRV_STOP				63 //
#define SRV_GET					64 //
#define SRV_GET_X				65 //


// Drivers
#define DRV_ADD					70
#define DRV_DEL					71
#define DRV_GET_X				72
#define DRV_GET					73



// Memory
#define MM_ALLOC				90
#define MM_FREE					91
#define MM_GETUSED				92
#define MM_GETTOTAL				93	


#define SYSCALL_INT				0x84

#include <libc/ctype.h>
#include "regs.h"

int syscall_call(regs_t);

#endif
